// main.cpp
#include "Student.h"
#include "Teacher.h"

void doSomerhing(Person* p)
{
    
    p->work();
}

int main()
{
    // Person *per = new Person;
    Person *stu = new Student;
    Person *tea = new Teacher;
    // doSomerhing(per);
    doSomerhing(stu);
    doSomerhing(tea);
    // per->work();
    // stu->work();
    // tea->work();
    // delete per;
    // per = nullptr;
    delete stu;
    stu = nullptr;
    delete tea;
    tea = nullptr;
    return 0;
}